package org.feit.findword.trie;

public class LettersMap {
	public static int cutoi(char c) {
		switch (c) {
		case 'А':
			return 0;
		case 'Б':
			return 1;
		case 'В':
			return 2;
		case 'Г':
			return 3;
		case 'Д':
			return 4;
		case 'Ѓ':
			return 5;
		case 'Е':
			return 6;
		case 'Ж':
			return 7;
		case 'З':
			return 8;
		case 'Ѕ':
			return 9;
		case 'И':
			return 10;
		case 'Ј':
			return 11;
		case 'К':
			return 12;
		case 'Л':
			return 13;
		case 'Љ':
			return 14;
		case 'М':
			return 15;
		case 'Н':
			return 16;
		case 'Њ':
			return 17;
		case 'О':
			return 18;
		case 'П':
			return 19;
		case 'Р':
			return 20;
		case 'С':
			return 21;
		case 'Т':
			return 22;
		case 'Ќ':
			return 23;
		case 'У':
			return 24;
		case 'Ф':
			return 25;
		case 'Х':
			return 26;
		case 'Ц':
			return 27;
		case 'Ч':
			return 28;
		case 'Џ':
			return 29;
		case 'Ш':
			return 30;

		}
		return -1;
	}

	public static char itouc(int i) {
		switch (i) {
		case 0:
			return 'А';
		case 1:
			return 'Б';
		case 2:
			return 'В';
		case 3:
			return 'Г';
		case 4:
			return 'Д';
		case 5:
			return 'Ѓ';
		case 6:
			return 'Е';
		case 7:
			return 'Ж';
		case 8:
			return 'З';
		case 9:
			return 'Ѕ';
		case 10:
			return 'И';
		case 11:
			return 'Ј';
		case 12:
			return 'К';
		case 13:
			return 'Л';
		case 14:
			return 'Љ';
		case 15:
			return 'М';
		case 16:
			return 'Н';
		case 17:
			return 'Њ';
		case 18:
			return 'О';
		case 19:
			return 'П';
		case 20:
			return 'Р';
		case 21:
			return 'С';
		case 22:
			return 'Т';
		case 23:
			return 'Ќ';
		case 24:
			return 'У';
		case 25:
			return 'Ф';
		case 26:
			return 'Х';
		case 27:
			return 'Ц';
		case 28:
			return 'Ч';
		case 29:
			return 'Џ';
		case 30:
			return 'Ш';

		}
		return '-';
	}
	
	public static int ctoi(char c) {
		if (c >= 'a' && c <= 'z')
			return c - 'a';
		if (c >= 'A' && c <= 'Z')
			return c - 'A';
		return -1;
	}

	public static char itoc(int i) {
		return (char) (i + 'A');
	}

}
